#!/usr/bin/env bash
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build ./internal/admin/cmd/main.go
version=$1
docker build -t registry.cn-beijing.aliyuncs.com/task-assign-cr/task-assignment-production-svc:${version} .
docker login --username=task-assignment@1428053377379786 -p "taskassignment@)@@" registry.cn-beijing.aliyuncs.com
docker push registry.cn-beijing.aliyuncs.com/task-assign-cr/task-assignment-production-svc:${version}
docker rmi $(docker images registry.cn-beijing.aliyuncs.com/task-assign-cr/task-assignment-production-svc:${version})
